<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{$app_name}</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/base.css" />
<style type="text/css">
html,body {font-family: "Source Sans Pro","Helvetica Neue", Helvetica, Arial, sans-serif, "Microsoft YaHei";font-size: 14px;color: #58666e;-webkit-font-smoothing: antialiased;line-height: 1.42857143;}
.login{width:400px;position:absolute; left:50%; top:50%; margin-left:-230px; margin-top:-150px;border: 1px solid #F0F0F0;border-radius: 6px;}
.title{color: #444;background: #f0f0f4;border-bottom: 1px solid #e5e5e5;border-radius:6px 6px 0 0;font-size:14px;font-weight: 600;padding: 15px;}
.row{margin:20px 40px}
input{width:300px;margin:10px 0px;padding:10px 6px;border: 1px solid #E7ECEE;border-radius:2px;}
input:focus {outline: none;}
.btn{height:45px;width:320px;line-height:45px;font-size:18px;text-align: center;outline: none;border:none;background-color: #3da2df;color: #FFF;border-radius:2px;cursor:pointer;}
.btn:hover{background-color:#2798DB;}
</style>
</head>
<body>
<form class="login" action="{:url('admin/index/login')}">
<input type="hidden" name="__token__" value="{$Request.token}" />
<div class="title">{$app_name}</div>
<div class="row fn-clear">
<ul>
    <li>
        <input datatype="*" class="input" type="text" name="username" placeholder="用户名" x-webkit-speech />
    </li>
    <li>
        <input datatype="*" class="input" type="password" name="password" placeholder="密码" autocomplete="off"  />
    </li>
<ul>
</div>
<div class="row"><button class="btn" type="submit">登 录</button></div>
</form>
<script type="text/javascript" src="__PUBLIC__/js/do.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/config.js"></script>
<script type = "text/javascript" >
Do('layer','form',function(){
    $(".login").Validform({
        btnSubmit:".btn",ajaxPost:true,tiptype:4,postonce:true,
        callback:function(data){
            if(data.code == 1){
                layer.alert(data['message'],{icon:5})
            }else{
                window.location.href = data.data['url'];
            }
        }
    });
})
</script>
</body>
</html>